package com.hk.web.domain.entity;

import com.hk.commons.domain.entity.IdEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;

/**
 * Created by Antinomy on 17/7/26.
 */
@Entity
@DynamicInsert
@DynamicUpdate
@EntityListeners(AuditingEntityListener.class)
public class UserAssignRole extends IdEntity {

    @Column(columnDefinition = "bigint(22) NOT NULL comment '用户ID'")
    private Long userId;

    @Column(columnDefinition = "bigint(22) NOT NULL comment '角色ID'")
    private Long roleId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }
}
